.container{
    display: flex;
    align-items: center;
    .item{
        animation-name: shrink;
        animation-duration: 2s;
        animation-timing-function: ease;
        animation-iteration-count: infinite;
        flex: 1;
        height: 100%;
    }
}
@keyframes shrink {
    0%{height: 100%;}
    50%{height: 40%;}
    100%{height: 100%}
}